﻿using System;
using System.Collections.Generic;
using System.Linq;
using AutoMapper;

namespace Core
{
    public class AutoMapperInit
    {
        public static void Run()
        {

            Mapper.Initialize(cfg =>
            {
                cfg.CreateMap<EF.Assignment, Dtos.Assignment>();
                cfg.CreateMap<EF.Calendar, Dtos.Calendar>();
                cfg.CreateMap<EF.CalendarDay, Dtos.CalendarDay>();
                cfg.CreateMap<EF.Dependency, Dtos.Dependency>();
                cfg.CreateMap<EF.Resource, Dtos.Resource>();
                cfg.CreateMap<EF.Task, Dtos.Task>();
                cfg.CreateMap<EF.TaskSegment, Dtos.TaskSegment>();


                cfg.CreateMap<Dtos.Assignment, EF.Assignment>();
                cfg.CreateMap<Dtos.Calendar, EF.Calendar>();
                cfg.CreateMap<Dtos.CalendarDay, EF.CalendarDay>();
                cfg.CreateMap<Dtos.Dependency, EF.Dependency>();
                cfg.CreateMap<Dtos.Resource, EF.Resource>();
                cfg.CreateMap<Dtos.Task, EF.Task>();
                cfg.CreateMap<Dtos.TaskSegment, EF.TaskSegment>();

            });
        }
    }
}
